<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>主页2</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__LIB__/layui-v2.5.4/css/layui.css" media="all">
    <link rel="stylesheet" href="__LIB__/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="__CSS__/public.css" media="all">
</head>
<style>
    .welcome .layui-card {border:1px solid #f2f2f2;border-radius:5px;}
    .welcome .icon {margin-right:10px;color:#1aa094;}
    .welcome .icon-cray {color:#ffb800 !important;}
    .welcome .icon-blue {color:#1e9fff !important;}
    .welcome .icon-tip {color:#ff5722 !important;}
    .welcome .layuimini-qiuck-module {text-align:center;margin-top:10px}
    .welcome .layuimini-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}
    .welcome .layuimini-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}
    .welcome .welcome-module {width:100%;height:210px;}
    .welcome .panel {background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
    .welcome .panel-body {padding:10px}
    .welcome .panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}
    .welcome .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top:.3em;}
    .welcome .layui-red {color:red}
    .welcome .main_btn > p {height:40px;}
    .welcome .layui-bg-number {background-color:#F8F8F8;}
</style>
<body>
    <div class="layuimini-container layuimini-page-anim">
        <div class="layuimini-main welcome">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md8">
                    <div class="layui-row layui-col-space15">
                        <div class="layui-col-md6">
                            <div class="layui-card">
                                <div class="layui-card-header"><i class="fa fa-warning icon"></i>数据统计</div>
                                <div class="layui-card-body">
                                    <div class="welcome-module">
                                        <div class="layui-row layui-col-space10">
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-blue">实时</span>
                                                            <h5>总订单</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins">{$total_order}</h1>
                                                            <small>当前分类总记录数</small>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-cyan">实时</span>
                                                            <h5>已就诊有效</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins">{$total_order_success}</h1>
                                                            <small>当前分类总记录数</small>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-orange">实时</span>
                                                            <h5>总收入</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins">{$total_profit}</h1>
                                                            <small>当前分类总记录数</small>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <span class="label pull-right layui-bg-green">实时</span>
                                                            <h5>总支出</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins">{$total_pay}</h1>
                                                            <small>当前分类总记录数</small>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-card">
                                <div class="layui-card-header"><i class="fa fa-credit-card icon icon-blue"></i>快捷入口</div>
                                <div class="layui-card-body">
                                    <div class="welcome-module">
                                        <div class="layui-row layui-col-space10 layuimini-qiuck">
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="{:url('order/index')}" layuimini-content-href="order/index" data-title="菜单管理" data-icon="fa fa-window-maximize">
                                                    <i class="fa fa-window-maximize"></i>
                                                    <cite>所有订单</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" layuimini-content-href="order/state1" data-title="待处理订单" data-icon="fa fa-gears">
                                                    <i class="fa fa-gears"></i>
                                                    <cite>待处理订单</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" layuimini-content-href="page/table.html" data-title="表格示例" data-icon="fa fa-file-text">
                                                    <i class="fa fa-file-text"></i>
                                                    <cite>待就诊订单</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" layuimini-content-href="page/icon.html" data-title="图标列表" data-icon="fa fa-dot-circle-o">
                                                    <i class="fa fa-dot-circle-o"></i>
                                                    <cite>待确认订单</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" layuimini-content-href="page/form.html" data-title="表单示例" data-icon="fa fa-calendar">
                                                    <i class="fa fa-calendar"></i>
                                                    <cite>已就诊有效订单</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" layuimini-content-href="page/404.html" data-title="404页面" data-icon="fa fa-hourglass-end">
                                                    <i class="fa fa-hourglass-end"></i>
                                                    <cite>已就诊无效订单</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" layuimini-content-href="page/button.html" data-title="按钮示例" data-icon="fa fa-snowflake-o">
                                                    <i class="fa fa-snowflake-o"></i>
                                                    <cite>未就诊订单</cite>
                                                </a>
                                            </div>
                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a href="javascript:;" layuimini-content-href="page/layer.html" data-title="已取消" data-icon="fa fa-shield">
                                                    <i class="fa fa-shield"></i>
                                                    <cite>已取消订单</cite>
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
    
                        </div>
                        <div class="layui-col-md12">
                            <div class="layui-card">
                                <div class="layui-card-header"><i class="fa fa-line-chart icon"></i>最新10条预约信息</div>
                                <div class="layui-card-body">
                                    <table id="LAY-user-table" lay-filter="LAY-user-table"></table>
                                    <script type="text/html" id="zizeng">
                                        {{d.LAY_TABLE_INDEX+1}}
                                    </script>
                                    <script type="text/html" id="stateTpl">
                                        {{#  if(d.state == 1){ }}
                                        <button class="layui-btn layui-btn-success layui-btn-xs">待处理</button>
                                        {{#  } else if(d.state == 2) { }}
                                        <button class="layui-btn layui-btn-danger layui-btn-xs">待就诊</button>
                                        {{#  } else if(d.state == 3) { }}
                                        <button class="layui-btn layui-btn-danger layui-btn-xs">待确认</button>
                                        {{#  } else if(d.state == 4) { }}
                                        <button class="layui-btn layui-btn-danger layui-btn-xs">已就诊有效</button>
                                        {{#  } else if(d.state == 5) { }}
                                        <button class="layui-btn layui-btn-danger layui-btn-xs">已就诊无效</button>
                                        {{#  } else if(d.state == 6) { }}
                                        <button class="layui-btn layui-btn-danger layui-btn-xs">未就诊</button>
                                        {{#  } else { }}
                                        <button class="layui-btn layui-btn-danger layui-btn-xs">已取消</button>
                                        {{#  } }}
                                    </script>
                                    <script type="text/html" id="table-seller-admin">
                                        {if (buttonAuth('order/detail'))}
                                        <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail"><i
                                                class="layui-icon layui-icon-face-smile-b"></i>查看</a>
                                        {/if}
                                    </script>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
    
                <div class="layui-col-md4">
                    <div class="layui-card">
                        <div class="layui-card-header"><i class="fa fa-fire icon"></i>订单统计</div>
                        <div class="layui-card-body layui-text">
                            <table class="layui-table">
                                <colgroup>
                                    <col width="100">
                                    <col>
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th></th>
                                        <th>订单</th>
                                        <th>收入</th>
                                        <th>支出</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>今天</td>
                                    <td>{$total_today}</td>
                                    <td>-</td>
                                    <td>-</td>
                                </tr>
                                <tr>
                                    <td>昨天</td>
                                    <td>{$total_yesterday}</td>
                                    <td>-</td>
                                    <td>-</td>
                                </tr>
                                <tr>
                                    <td>本周</td>
                                    <td>{$total_week}</td>
                                    <td>-</td>
                                    <td>-</td>
                                </tr>
                                <tr>
                                    <td>上周</td>
                                    <td>{$total_lastweek}</td>
                                    <td>-</td>
                                    <td>-</td>
                                </tr>
                                <tr>
                                    <td>本月</td>
                                    <td>{$total_month}</td>
                                    <td>{$total_profit_month}</td>
                                    <td>{$total_pay_month}</td>
                                </tr>
                                <tr>
                                    <td>上月</td>
                                    <td>{$total_lastmonth}</td>
                                    <td>{$total_profit_lastmonth}</td>
                                    <td>{$total_pay_lastmonth}</td>
                                </tr>
                                <tr>
                                    <td>今年</td>
                                    <td>{$total_year}</td>
                                    <td>{$total_profit_year}</td>
                                    <td>{$total_pay_year}</td>
                                </tr>
                                <tr>
                                    <td>去年</td>
                                    <td>{$total_lastyear}</td>
                                    <td>{$total_profit_lastyear}</td>
                                    <td>{$total_pay_lastyear}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>

                    <div class="layui-card">
                        <div class="layui-card-header"><i class="fa fa-fire icon"></i>版本信息</div>
                        <div class="layui-card-body layui-text">
                            <table class="layui-table">
                                <colgroup>
                                    <col width="100">
                                    <col>
                                </colgroup>
                                <tbody>
                                <tr>
                                    <td>服务器IP</td>
                                    <td>
                                        {:getHostByName(request()->host())}
                                    </td>
                                </tr>
                                <tr>
                                    <td>PHP版本</td>
                                    <td>{:PHP_VERSION}</td>
                                </tr>
                                <tr>
                                    <td>MYSQL版本</td>
                                    <td>{:getMysqlVersion()}</td>
                                </tr>
                                <tr>
                                    <td>ThinkPHP</td>
                                    <td>
                                        {$tp_version}
                                    </td>
                                </tr>
                                <tr>
                                    <td>上传附件限制</td>
                                    <td>
                                        {:ini_get("file_uploads")}M
                                    </td>
                                </tr>
                                <tr>
                                    <td>运行环境</td>
                                    <td style="padding-bottom: 0;">
                                        <div class="layui-btn-container">
                                            {:$_SERVER["SERVER_SOFTWARE"]}
                                        </div>
                                    </td>
                                </tr>
                                
                                </tbody>
                            </table>
                        </div>
                    </div>
    
                    <div class="layui-card">
                        <div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>作者心语</div>
                        <div class="layui-card-body layui-text layadmin-text">
                            <p>技术栈: TP5.1+layui2.5.5</p>
                        </div>
                    </div>
    
                </div>
            </div>
        </div>
    </div>
    <script src="/static/layui/layui.all.js"></script>
    <script src="/static/common/js/layTool.js"></script>
    <script src="/static/common/js/jquery.min.js"></script>
    <script src="__JS__/lay-config.js" charset="utf-8"></script>
<script>
    layui.config({
        base: '/static/admin/'
    }).use(['table', 'util'], function () {});
    renderTable();
    function renderTable() {
        layui.use(['table', 'form','layer'], function () {
            var $ = layui.$
                ,form = layui.form
                ,layer = layui.layer
                ,table = layui.table;

            table.render({
                elem: "#LAY-user-table",
                url: "/admin/index/tenOrder",
                cols: [
                    [{
                        field: 'zizeng',
                        width: 80,
                        title: '编号',
                        templet: '#zizeng'
                    },
                        {
                            field: "name",
                            title: "体检人姓名",
                        }, {
                        field: "phone",
                        title: "体检人电话",
                    }, {
                        field: "idcard",
                        title: "体检人身份证号",
                    }, {
                        field: "hospital",
                        title: "预约医院",
                        minWidth: 200,
                    }, {
                        field: "check_time",
                        title: "预约体检时间",
                        templet: "<div>{{layui.util.toDateString(d.check_time,'yyyy-MM-dd')}}</div>",
                    }, {
                        field: "add_time",
                        title: "提交时间",
                    }, {
                        field: "weburl",
                        title: "来源网站",
                    }, {
                        field: "state",
                        title: "当前状态",
                        templet: '#stateTpl',
                        align: 'center'
                    }, {
                        title: "操作",
                        align: "center",
                        fixed: "right",
                        toolbar: "#table-seller-admin"
                    }]
                ],
                limit: 10,
                text: "对不起，加载出现异常！"
            });
            layui.use(['table', 'layer'], function () {
                let layer = layui.layer;
                let table = layui.table;


                table.on("tool(LAY-user-table)",
                    function (e) {
                        if ("detail" === e.event) {
                            layTool.open("/admin/order/detail/id/" + e.data.id, "查看订单详情", '90%', '90%');
                        }
                    });
            });



        });
    }
</script>
</body>
</html>